<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>添加地区</title>
<script src="${ pageContext.request.contextPath }/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	function submitForm() {
		$("#area_add_form").serializeArray();
		$.ajax({
			type : "POST",
			dataType : "json",
			url : "area_doAdd.do",
			data : $('#area_add_form').serialize(),
			success : function(result) {
				if (result.type == "1") {
					alert("提交成功");
				} else if (result.type == "0") {
					alert(result.msg);
				} else {
					alert("返回结果有误");
				}
			},
			error : function(data) {
				alert("服务器连接错误");
			}

		});
	}
</script>
</head>
<body>
	<form id="area_add_form" action="area_doAdd.do" method="post">
		<table border="" cellspacing="" cellpadding="">
			<tr>
				<td>地区编码：</td>
				<td><input type="text" name="code" id="code" value="" /></td>
			</tr>
			<tr>
				<td>原名称：</td>
				<td><input type="text" name="name" id="name" value="" /></td>
			</tr>
			<tr>
				<td>中文名称：</td>
				<td><input type="text" name="cname" id="cname" value="" /></td>
			</tr>
			<tr>
				<td>币种：</td>
				<td><input type="text" name="currency" id="currency" value="" /></td>
			</tr>
			<tr>
				<td>备注：</td>
				<td><input type="text" name="remarks" id="remarks" value="" /></td>
			</tr>
			<tr>
				<td colspan="2"><input type="button" value="提交"
					onclick="submitForm()" /></td>
			</tr>
		</table>
	</form>
</body>
</html>